package com.time.thread.basic;

/**
 * @program: tes
 * @description:
 * @author: xuejingjing
 * @create: 2021-10-19 09:00
 **/
public class RandomThread extends  Thread {
    @Override
    public void run() {
        super.run();
        for (int i = 0; i < 10 ; i++) {
            int time = (int)Math.random()*1000;
            try {
                Thread.sleep(time);
                System.out.println("run="+ Thread.currentThread().getName());
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}

